package com.lm.activiti.boot;

import com.lm.activiti.boot.annotation.parser.OuterHandlerParser;
import org.springframework.beans.factory.support.BeanDefinitionReader;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

/**
 * @author lm_jcf
 * @date 2020/12/11 16:21
 */
public class SpringParser {

    public static void main(String[] args) {

        Resource resource = new ClassPathResource("applicationContext.xml");

        DefaultListableBeanFactory factory = new DefaultListableBeanFactory();

        BeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);

        reader.loadBeanDefinitions(resource);

        OuterHandlerParser outerHandlerParser = (OuterHandlerParser) factory.getBean("outerHandlerParser");

    }
}
